Ext.define("TS.view.base.ProductClassifyTree",{
	extend:'Ext.tree.Panel',
	alias: 'widget.prodclassifytree',
	title : '商品类别',
	width : 250,
	height: 300,
	padding : '3 1 1 0',
	rootVisible : false,//控制显隐的属性
	animate: true,
	useArrows: true, 
	displayField :'classifyName',
	dockedItems:[{
		xtype:'toolbar',
		dock:'top',
		items:[
			{xtype:'button',action:'add',iconCls:'tree-add-button' },
			{xtype:'button',action:'upd',iconCls:'tree-upd-button' },
			{xtype:'button',action:'del',iconCls:'tree-del-button' },
			{xtype:'button',action:'all',iconCls:'tree-all-button' }
		]
	}],
	viewConfig:{
		plugins :{
			ptype:'treeviewdragdrop',
			appendOnly : true
		},
		listeners:{
			drop:function( node,  data,  overModel,  dropPosition,  options){
				//ajax的操作把数据同步到后台数据库
				//alert("把: "+data.records[0].get('text')+" 移动到: "+overModel.get('text'));			
			},
			beforedrop:function( node,  data,  overModel,  dropPosition,  dropFunction,  options){

			}
		}
	},
	initComponent:function(){
		var st=Ext.create('TS.store.base.ProductClassifyStore');
		this.store=st;
		this.callParent(arguments);
	}
	
	//selType:'checkboxmodel',//设定选择模式
	//multiSelect:true//运行多选
});